home *** CD-ROM | disk | FTP | other *** search
- /*
- File: ProcessesPrivate.h
-
- Copyright: © 1983-1993 by Apple Computer, Inc.
- All rights reserved.
-
- Version: System 7.1
- Created: Thursday, April 28, 1989 18:00
-
- */
-
- #pragma once
-
- #ifndef __PROCESSESPRIVATE__
- #define __PROCESSESPRIVATE__
-
- #ifndef __TYPES__
- #include <Types.h>
- /* #include <ConditionalMacros.h> */
- /* #include <MixedMode.h> */
- /* #include <Traps.h> */
- #endif
-
- #ifndef __PROCESSES__
- #include <Processes.h>
- /* #include <Events.h> */
- /* #include <Quickdraw.h> */
- /* #include <QuickdrawText.h> */
- /* #include <IntlResources.h> */
- /* #include <OSUtils.h> */
- /* #include <Files.h> */
- /* #include <SegLoad.h> */
- #endif
-
-
- #ifndef __LAYERS__
- #include "Layers.h"
- /* #include <Layers.h> */
- /* #include <QuickDraw.h> */
- /* #include <QuickdrawText.h> */
- /* #include <IntlResources.h> */
- #endif
-
- typedef struct ProcessStuff ProcessStuff;
- typedef ProcessStuff *ProcessStuffPtr, **ProcessStuffHndl;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct ProcessStuff {
- long reserved1[14];
- Str31 processName;
- long reserved2[34];
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct ProcessDescriptor ProcessDescriptor;
- typedef ProcessDescriptor *ProcessDescriptorPtr;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct ProcessDescriptor {
- short processState;
- short processIdentifier;
- OSType processType; // type of the "application"
- OSType processSignature; // signature of the "application"
- long reserved1[2];
- ProcessDescriptorPtr processNext; // next ProcessDescriptor (nil terminated)
- long reserved2[3];
- ProcessSerialNumber processNumber;
- long reserved3[10];
- ProcessStuffHndl processStuff;
- long reserved4[6];
- LayerPtr processLayer;
- long reserved5[59];
- short reserved6;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- extern pascal LayerPtr GetCurrentProcessLayer(void)
- THREEWORDINLINE(0x3F3C, 0x0004, 0xA88F);
- /* returns the window whose content region contains the point */
- extern pascal WindowPtr WhichWindow(Point where)
- THREEWORDINLINE(0x3F3C, 0x000F, 0xA88F);
- /* returns processIdentifier field for current process or zero if none */
- extern pascal short GetCurrentProcessIdentifier(void)
- THREEWORDINLINE(0x3F3C, 0x0013, 0xA88F);
- /* returns next process layer */
- extern pascal LayerPtr GetNextProcessLayer(LayerPtr theLayer, Boolean visible)
- THREEWORDINLINE(0x3F3C, 0x002B, 0xA88F);
- /* returns first process layer */
- #define GetFirstProcessLayer(visible) GetNextProcessLayer(nil, visible)
- extern pascal OSErr GetFinderProcess(ProcessSerialNumber *PSN)
- THREEWORDINLINE(0x3F3C, 0x0056, 0xA88F);
-
- /* ProcessWorld is actually "MultiFinder's" A5 */
- #define GetProcessWorld() (* (long *) 0x0B7C)
- /* -0x30C is the first ProcessDescriptor */
- extern pascal ProcessDescriptorPtr XGetFirstProcessDescriptor(void)
- FOURWORDINLINE(0x2078, 0x0B7C, 0x2EA8, 0xFCF4);
- /* -0x330 is the current ProcessDescriptor */
- extern pascal ProcessDescriptorPtr XGetCurrentProcessDescriptor(void)
- FOURWORDINLINE(0x2078, 0x0B7C, 0x2EA8, 0xFCD0);
- /* -0x356 is the "MultiFinder" layer */
- extern pascal LayerPtr XGetMFRootLayer(void)
- FOURWORDINLINE(0x2078, 0x0B7C, 0x2EA8, 0xFCAA);
- /* _0x362 is the Finder ProcessDesciptor */
- extern pascal ProcessDescriptorPtr XGetFinderProcessDescriptor(void)
- FOURWORDINLINE(0x2078, 0x0B7C, 0x2EA8, 0xFC9E);
-
- #endif
-